package com.karrim.server.io;

import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import com.karrim.server.annotation.Annotation.Dsn;
import com.karrim.server.annotation.Annotation.MySQLConnectionString;
import com.karrim.server.io.sql.AccessLoader;
import com.karrim.server.io.sql.MySQLExporter;

/**
 *
 * @author andrea.cantafio
 */
public class IOModule extends AbstractModule {

    @Override
    protected void configure() {
        bindConstant().annotatedWith(Dsn.class).to("Curve");
        bindConstant().annotatedWith(MySQLConnectionString.class).to("jdbc:mysql://localhost:3306/curve?user=root&pass=");
        bind(AccessLoader.class).in(Singleton.class);
        bind(JClassLoader.class).in(Singleton.class);
        bind(MySQLExporter.class).in(Singleton.class);
    }

}
